﻿namespace AC.ExtendedRenderer.Toolkit
{
    using ComponentFactory.Krypton.Toolkit;
    using System;
    using System.ComponentModel;
    using System.Drawing;
    using System.Windows.Forms;

    [ToolboxItem(true)]
    public class KryptonViewButtons : UserControl
    {
        private string _percentageLabel = "100%";
        private IContainer components;
        internal KryptonCheckSet kcheckset;
        public KryptonCheckButton kcmdleft;
        public KryptonCheckButton kcmdmiddleleft;
        public KryptonCheckButton kcmdmiddleright;
        public KryptonButton kcmdpercentage;
        public KryptonCheckButton kcmdright;

        public KryptonViewButtons()
        {
            this.InitializeComponent();
            base.SetStyle(ControlStyles.SupportsTransparentBackColor, true);
            base.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
            base.SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
            base.SetStyle(ControlStyles.ResizeRedraw, true);
            base.SetStyle(ControlStyles.UserPaint, true);
            this.BackColor = Color.Transparent;
            this.kcmdpercentage.Text = this._percentageLabel;
        }

        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.components != null))
            {
                this.components.Dispose();
            }
            base.Dispose(disposing);
        }

        private void InitializeComponent()
        {
            this.components = new Container();
            this.kcmdpercentage = new KryptonButton();
            this.kcmdmiddleright = new KryptonCheckButton();
            this.kcmdmiddleleft = new KryptonCheckButton();
            this.kcheckset = new KryptonCheckSet(this.components);
            this.kcmdleft = new KryptonCheckButton();
            this.kcmdright = new KryptonCheckButton();
            base.SuspendLayout();
            this.kcmdpercentage.Anchor = AnchorStyles.Right;
            this.kcmdpercentage.ButtonStyle = ButtonStyle.LowProfile;
            this.kcmdpercentage.Location = new Point(0x4d, 0);
            this.kcmdpercentage.Name = "kcmdpercentage";
            this.kcmdpercentage.Size = new Size(40, 0x12);
            this.kcmdpercentage.StateCommon.Content.Padding = new Padding(-4);
            this.kcmdpercentage.TabIndex = 14;
            this.kcmdpercentage.Text = "100%";
            this.kcmdpercentage.Values.ExtraText = "";
            this.kcmdpercentage.Values.Image = null;
            this.kcmdpercentage.Values.ImageStates.ImageCheckedNormal = null;
            this.kcmdpercentage.Values.ImageStates.ImageCheckedPressed = null;
            this.kcmdpercentage.Values.ImageStates.ImageCheckedTracking = null;
            this.kcmdpercentage.Values.Text = "100%";
            this.kcmdmiddleright.Anchor = AnchorStyles.Left;
            this.kcmdmiddleright.Location = new Point(0x25, 0);
            this.kcmdmiddleright.Name = "kcmdmiddleright";
            this.kcmdmiddleright.Size = new Size(0x11, 0x12);
            this.kcmdmiddleright.StateCommon.Border.DrawBorders = PaletteDrawBorders.TopBottom;
            this.kcmdmiddleright.StateCommon.Content.Padding = new Padding(-2, -3, -4, -4);
            this.kcmdmiddleright.TabIndex = 13;
            this.kcmdmiddleright.Values.ExtraText = "";
            this.kcmdmiddleright.Values.Image = null;
            this.kcmdmiddleright.Values.Text = "";
            this.kcmdmiddleleft.Anchor = AnchorStyles.Left;
            this.kcmdmiddleleft.Location = new Point(0x13, 0);
            this.kcmdmiddleleft.Name = "kcmdmiddleleft";
            this.kcmdmiddleleft.Size = new Size(0x11, 0x12);
            this.kcmdmiddleleft.StateCommon.Border.DrawBorders = PaletteDrawBorders.TopBottom;
            this.kcmdmiddleleft.StateCommon.Content.Padding = new Padding(-2, -3, -4, -4);
            this.kcmdmiddleleft.TabIndex = 12;
            this.kcmdmiddleleft.Values.ExtraText = "";
            this.kcmdmiddleleft.Values.Image = null;
            this.kcmdmiddleleft.Values.Text = "";
            this.kcheckset.AllowUncheck = true;
            this.kcheckset.CheckButtons.Add(this.kcmdmiddleright);
            this.kcheckset.CheckButtons.Add(this.kcmdmiddleleft);
            this.kcheckset.CheckButtons.Add(this.kcmdleft);
            this.kcheckset.CheckButtons.Add(this.kcmdright);
            this.kcheckset.CheckedButton = this.kcmdright;
            this.kcmdleft.Anchor = AnchorStyles.Left;
            this.kcmdleft.Location = new Point(0, 0);
            this.kcmdleft.Name = "kcmdleft";
            this.kcmdleft.Size = new Size(0x12, 0x12);
            this.kcmdleft.StateCommon.Border.DrawBorders = PaletteDrawBorders.TopBottomLeft;
            this.kcmdleft.TabIndex = 11;
            this.kcmdleft.Values.ExtraText = "";
            this.kcmdleft.Values.Image = null;
            this.kcmdleft.Values.Text = "";
            this.kcmdright.Anchor = AnchorStyles.Left;
            this.kcmdright.Checked = true;
            this.kcmdright.Location = new Point(0x37, 0);
            this.kcmdright.Name = "kcmdright";
            this.kcmdright.Size = new Size(0x12, 0x12);
            this.kcmdright.StateCommon.Border.DrawBorders = PaletteDrawBorders.TopBottomRight;
            this.kcmdright.StateCommon.Content.Padding = new Padding(-2, -3, -4, -4);
            this.kcmdright.TabIndex = 10;
            this.kcmdright.Values.ExtraText = "";
            this.kcmdright.Values.Image = null;
            this.kcmdright.Values.Text = "";
            base.AutoScaleMode = AutoScaleMode.None;
            this.BackColor = Color.Transparent;
            base.Controls.Add(this.kcmdpercentage);
            base.Controls.Add(this.kcmdmiddleright);
            base.Controls.Add(this.kcmdmiddleleft);
            base.Controls.Add(this.kcmdleft);
            base.Controls.Add(this.kcmdright);
            this.DoubleBuffered = true;
            this.Font = new Font("Segoe UI", 8.25f);
            base.Name = "KryptonViewButtons";
            base.Size = new Size(0x75, 0x12);
            base.ResumeLayout(false);
        }

        [DefaultValue(typeof(string), "100%"), Category("ViewButtons")]
        public string PercentageLabel
        {
            get
            {
                return this._percentageLabel;
            }
            set
            {
                this.kcmdpercentage.Text = value;
                this._percentageLabel = value;
                base.Invalidate();
            }
        }
    }
}

